package com.lazily.codeblock_;


/**
 * @Author:  GZQ
 * @date:  2025/2/7 21:53
 * @description: 代码块练习1
 */


class Person {
	public static int total;//静态变量

	static {//静态代码块
		total = 100;
		System.out.println("in static block!");//(1)
	}
}

public class CodeBlockExercise01 {
	public static void main(String[] args) {
		System.out.println("total = "+ Person.total); //100
		System.out.println("total = "+ Person.total); //100
	}
}